/*
 * @Author       : 震雨 LuckRain7
 * @Date         : 2020-07-21
 * @Description  : 登录相关接口
 * @ Love and Peace
 */

// 引入axios | 路径配置
import { AJAX_PATH } from "@/services/config.js";

// 导入 封装的 无权限请求
import { HTTP_UNLIMITED, HTTP_LIMITED } from "@/utils/axios.js";

class LoginHttpUl extends HTTP_UNLIMITED {
  login(options) {
    return this._post(AJAX_PATH.postLogin, options);
  }

  // 获取 验证码 拼接 currDateTime 当前时间
  getCaptcha(currDateTime) {
    console.log("AJAX_PATH:::", AJAX_PATH);
    return this._get(AJAX_PATH.getCaptcha + currDateTime, {});
  }
}

class LoginHttpL extends HTTP_LIMITED {
  // 获取导航菜单权限
  GetNavMenuHttp() {
    return this._get(AJAX_PATH.getNavMenu, {});
  }
}

export { LoginHttpUl, LoginHttpL };
